home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
001
/
pibt40s1.arc
/
CAPTUREC.MOD
< prev
next >
Wrap
Text File
|
1987-03-11
|
2KB
|
52 lines
(*----------------------------------------------------------------------*)
(* Capture_Char -- write character to capture file *)
(*----------------------------------------------------------------------*)
PROCEDURE Capture_Char( Ch : CHAR );
(*----------------------------------------------------------------------*)
(* *)
(* Procedure: Capture_Char *)
(* *)
(* Purpose: Writes character to capture file *)
(* *)
(* Calling Sequence: *)
(* *)
(* Capture_Char( Ch : CHAR ); *)
(* *)
(* Ch --- the character to be written out *)
(* *)
(* Remarks: *)
(* *)
(* If Exact_Capture is TRUE, then characters are written just *)
(* as they are received. If Exact_Capture is FALSE, then *)
(* a full screen image line is gathered up and written when *)
(* an LF or FF is encountered. *)
(* *)
(*----------------------------------------------------------------------*)
VAR
Screen_Line : AnyStr;
IY : INTEGER;
BEGIN (* Capture_Char *)
IF Exact_Capture THEN
IF ( Ch = CHR( LF ) ) THEN
WRITELN( Capture_File )
ELSE
WRITE( Capture_File , Ch )
ELSE
BEGIN
IF ( ( Ch = CHR( LF ) ) OR ( Ch = CHR( FF ) ) ) THEN
BEGIN
IY := WhereY;
Get_Screen_Text_Line( Screen_Line , IY, 1 );
WRITELN( Capture_File , TRIM( Screen_Line ) );
END;
IF ( Ch = CHR( FF ) ) THEN
WRITE( Capture_File , Ch );
END;
END (* Capture_Char *);